* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #1e1e1e;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* 左侧边栏 */
.sidebar {
    width: 200px;
    background-color: #181818;
    height: 100vh;
    transition: all 0.5s ease-in-out;
    overflow-y: auto;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .menu-item-text {
    display: none;
}

.sidebar.collapsed .menu-item-icon {
    margin-right: 0;
    width: 100%;
    text-align: center;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .sidebar-footer .menu-item-text {
    display: none;
}

.sidebar.collapsed .toggle-sidebar {
    margin-right: 0;
}

.sidebar-header {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 10px;
}

.logo-text {
    font-weight: 600;
    font-size: 16px;
}

.sidebar-collapsed .logo-text {
    display: none;
}

.sidebar-menu {
    flex: 1;
    padding: 15px 0;
}

.menu-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.menu-item.active {
    background-color: #2a2a2a;
    border-left: 3px solid #4a90e2;
}

.menu-item:hover {
    background-color: #2a2a2a;
}

.menu-item-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.menu-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
}

.toggle-sidebar {
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #2a2a2a;
    background-color: #181818;
}

.header-left {
    display: flex;
    align-items: center;
}

.back-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.5s ease-in-out;
}

.back-button:hover {
    background-color: #2a2a2a;
}

.menu-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 15px;
}

.menu-button:hover {
    background-color: #2a2a2a;
}

.chat-title {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.header-button:hover {
    background-color: #2a2a2a;
}

.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.user-message {
    align-items: flex-end;
}

.assistant-message {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.user-message .message-content {
    background-color: #4a90e2;
    color: white;
    border-radius: 18px 18px 0 18px;
}

.assistant-message .message-content {
    background-color: #2a2a2a;
    border-radius: 18px 18px 18px 0;
}

.tool-use {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.tool-label {
    color: #888;
    margin-right: 10px;
    font-size: 13px;
}

.tool-icon {
    margin-right: 8px;
    color: #aaa;
}

.tool-search {
    flex: 1;
    background-color: #333;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #e0e0e0;
    border: none;
    outline: none;
}

.tool-action {
    margin-left: 10px;
    color: #aaa;
    cursor: pointer;
}

.tool-action:hover {
    color: #ccc;
}

.input-container {
    padding: 15px 20px;
    border-top: 1px solid #2a2a2a;
    background-color: #181818;
}

.input-area {
    position: relative;
}

.input-field {
    width: 100%;
    height: 60px;
    background-color: #2a2a2a;
    border-radius: 10px;
    border: none;
    padding: 15px;
    color: #e0e0e0;
    font-size: 14px;
    resize: none;
    outline: none;
}

.input-actions {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
}

.voice-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 50%;
    background-color: transparent;
    color: #aaa;
}

.voice-button:hover {
    background-color: #333;
    color: #ccc;
}

.send-button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background-color: #333;
    color: #aaa;
}

.send-button:hover {
    background-color: #444;
    color: #ccc;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #181818;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}